﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Dln.Common;
using Dln.Common.Helper;

public partial class Page_AutoUpdate_StatisticsList : System.Web.UI.Page
{
    protected string CurrInHospNum = string.Empty; //入院
    protected string CurrOutHospNum = string.Empty; //出院
    protected string CurrLeaveHospNum = string.Empty; //退院
    protected string CurrInHospNums = string.Empty; //在院
    protected string CurrCriticallyIllInHospNum = string.Empty; //病危
    protected string Key = string.Empty;
    protected string UnicodeKey = string.Empty;
    protected void Page_Load(object sender, EventArgs e)
    {

        Key = HttpContext.Current.Request.QueryString["Key"].Replace("%2B", "+");
        UnicodeKey = HttpContext.Current.Request.QueryString["Key"].Replace("+", "%2B");
        //昨日入院人数
        object[] arge = new object[1];
        arge[0] = Key;
        var url = CommonHelper.GetAppSettings("DlnService1");
        object getCurrInHospNum = WebServiceHelper.InvokeWebService(url, "GetCurrDayInHospNum", arge);
        if (getCurrInHospNum != null)
        {
            CurrInHospNum = getCurrInHospNum.ToString();
        }

        //昨日出院人数
        object getCurrOutHospNum = WebServiceHelper.InvokeWebService(url, "GetCurrOutHospNum", arge);
        if (getCurrOutHospNum != null)
        {
            CurrOutHospNum = getCurrOutHospNum.ToString();
        }

        //昨日退院人数
        object getCurrLeaveHospNum = WebServiceHelper.InvokeWebService(url, "GetCurrLeaveHospNum", arge);
        if (getCurrLeaveHospNum != null)
        {
            CurrLeaveHospNum = getCurrLeaveHospNum.ToString();
        }

        //今日在院退院人数
        object getCurrInHospNums = WebServiceHelper.InvokeWebService(url, "GetCurrInHospNum", arge);
        if (getCurrInHospNums != null)
        {
            CurrInHospNums = getCurrInHospNums.ToString();
        }

        //昨日危重患者人数
        object getCurrCriticallyIllInHospNum = WebServiceHelper.InvokeWebService(url, "GetCurrCriticallyIllInHospNum", arge);
        if (getCurrCriticallyIllInHospNum != null)
        {
            CurrCriticallyIllInHospNum = getCurrCriticallyIllInHospNum.ToString();
        }

    }
}